STEP 19: We're almost done with our click event! Let's just add our sprite's points to our score.

  • In , drag Global Variable inside your click event and change my_var to score.
  • Then, drag Add Value inside your click event. It should be indented 8 spaces.
  • Change my_var to score and change 1 to my_value.
  • Then, drag in Update Display inside your click event and change my_var to score.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)